import request from '@/utils/request'

// 查询疾病表列表
export function listIcd(query) {
  return request({
    url: '/medical/icd/list',
    method: 'get',
    params: query
  })
}

// 查询疾病表详细
export function getIcd(id) {
  return request({
    url: '/medical/icd/' + id,
    method: 'get'
  })
}

// 新增疾病表
export function addIcd(data) {
  return request({
    url: '/medical/icd',
    method: 'post',
    data: data
  })
}

// 修改疾病表
export function updateIcd(data) {
  return request({
    url: '/medical/icd',
    method: 'put',
    data: data
  })
}

// 删除疾病表
export function delIcd(id) {
  return request({
    url: '/medical/icd/' + id,
    method: 'delete'
  })
}

// 导出疾病表
export function exportIcd(query) {
  return request({
    url: '/medical/icd/export',
    method: 'get',
    params: query
  })
}